<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			body{
				height: 100%;
			}
		</style>
	</head>
	<body>
	</body>
	
</html>
<script type="text/javascript">
		window.onload = function  () {
			
		var div = document.createElement("div");
		var divattr = document.createAttribute("class");
		divattr.value = "test";
		document.getElementsByTagName("body")[0].appendChild(div)
		div.setAttributeNode(divattr)
		var text = document.createTextNode("hello,world"); 
		div.appendChild(text);
	
			
		}
		
		
	</script>
